package com.chuangsi.project.admin.dto.admin.order;

import com.chuangsi.common.enums.OrderStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author wangshengming
 * @date 2023/3/27
 */
@Data
public class ResOrderPageDto {

    @ApiModelProperty(value = "订单id")
    private String orderId;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "销售金额")
    private BigDecimal money;

    @ApiModelProperty(value = "印章名称")
    private String sealName;

    @ApiModelProperty(value = "审核状态（1.待审核，2.通过，3.已驳回，4.申请退保，5.已退保 6.退保驳回）")
    private String appStatus;

    @ApiModelProperty(value = "审核状态")
    private String appStatusStr;

    @ApiModelProperty(value = "客户名称")
    private String customName;

    @ApiModelProperty(value = "客户联系方式")
    private String customPhone;

    @ApiModelProperty(value = "客户身份证号")
    private String customIdCard;

    @ApiModelProperty(value = "车架号")
    private String vin;

    @ApiModelProperty(value = "发动机号")
    private String engineNo;

    @ApiModelProperty(value = "新车发票价格")
    private String carInvoicePrice;

    @ApiModelProperty(value = "管理员id")
    private Long userId;

    @ApiModelProperty(value = "管理员名称")
    private String nickName;

    @ApiModelProperty(value = "部门名称（经销商）")
    private String deptName;

    @ApiModelProperty(value = "是否E签宝合同（Y:是 N:否）")
    private String esignContract;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "文件id（用于E签宝）")
    private String fileId;

    @ApiModelProperty(value = "签署流程id")
    private String signFlowId;

    @ApiModelProperty(value = "订单备注")
    private String remark;

    public String getAppStatusStr() {
        return OrderStatusEnum.getName(appStatus);
    }
}
